//
//  PersonneController.m
//  BurnFat
//
//  Created by lanou3g on 16/5/9.
//  Copyright © 2016年 ZhaoYingWei. All rights reserved.
//

#import "PersonneController.h"
#import "UIView+Frame.h"
#import "UIImage+circlelogo.h"
#import "PersonialView.h"
@interface PersonneController ()
@property(nonatomic,strong)NSMutableArray *array;
@end
static NSString *const CEllID = @"person";
@implementation PersonneController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:CEllID];
    [self setupNavConfiger];
    PersonialView *p =[[PersonialView alloc]initWithFrame:CGRectMake(0, 0, ScreenWidth, 200)];
    p.height = 200;
    self.tableView.tableHeaderView = p;
 
    
    
}
-(void)setupNavConfiger
{
    UIBarButtonItem *backitem = [[UIBarButtonItem alloc]initWithImage:[UIImage imageNamed:@"sapi_nav_back"] style:UIBarButtonItemStylePlain target:self action:@selector(PopAction)];
    
    UIImageView *icon = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"oo.jpg"]];
    
    
    icon.frame = CGRectMake(0, 0, 30, 30);
    icon.layer.cornerRadius = icon.height/2;
    icon.layer.masksToBounds = YES;
    UIBarButtonItem *iconitem = [[UIBarButtonItem alloc]initWithCustomView:icon];
    UILabel *nameLabel = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, 300, 30)];
    nameLabel.text = @"方晓勇";
    UIBarButtonItem *nameitem = [[UIBarButtonItem alloc]initWithCustomView:nameLabel];
    self.navigationItem.leftBarButtonItems = @[backitem,iconitem,nameitem];
    UIImageView *menu = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"Menu_expanded_1390px_1183428_easyicon.net"]];
    
    menu.size = CGSizeMake(20, 20);
    UIBarButtonItem *menuitem  = [[UIBarButtonItem alloc]initWithCustomView:menu];
    UIImageView *ercode = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"qr_code_26px_1172695_easyicon.net"]];
    ercode.size = CGSizeMake(20 , 20);
    UIBarButtonItem *ercodeitem  = [[UIBarButtonItem alloc]initWithCustomView:ercode];
    self.navigationItem.rightBarButtonItems = @[menuitem,ercodeitem];
    
    
}
-(void)PopAction
{
    [self.navigationController popViewControllerAnimated:YES];
}
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return 200;
}
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CEllID];
    return cell;
   
}
@end
